package com.shoe.util;


import com.shoe.vo.ResponseResult;
import org.springframework.stereotype.Component;

@Component
public class ResultUtil {

    public ResponseResult getResponseResult(Integer code, String message, Integer count, Object data) {
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(code);
        responseResult.setMsg(message);
        responseResult.setCount(count);
        responseResult.setData(data);
        return responseResult;
    }

    public ResponseResult getResponseResult(Integer code, String message) {
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(code);
        responseResult.setMsg(message);
        return responseResult;
    }

    public ResponseResult getResponseResult(Integer code, Integer count, Object data) {
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(code);
        responseResult.setCount(count);
        responseResult.setData(data);
        return responseResult;
    }

    public ResponseResult getResponseResult(Integer code, String message, Integer count) {
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(code);
        responseResult.setCount(count);
        return responseResult;
    }

    public ResponseResult getResponseResult(Integer code, String message, Object data) {
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(code);
        responseResult.setData(data);
        return responseResult;
    }

    public ResponseResult getResponseResult(Integer code) {
        ResponseResult responseResult = new ResponseResult();
        responseResult.setCode(code);
        return responseResult;
    }
}
